#include "XmlManager.h"
XMLManager::XMLManager(const char* fileName)
{
	Load(fileName);
}
XMLManager::~XMLManager()
{
	if (doc)
	{
		delete doc;
		doc = 0;
	}
}
bool XMLManager::Load(const char *filename)
{
	doc = new TiXmlDocument(filename);
	return doc->LoadFile();
}
void XMLManager::Save()
{
	doc->SaveFile();
}
std::string XMLManager::ConvertToString(char *str,int i)
{
	char name[256];
	memset(name,'\0',256);
	strcat(name,str);
	char  index[256];
	memset(index,'\0',256);
	itoa(i,index,10);
	strcat(name,index);
	std::string result;
	result.append(name);
	return result;
}